﻿@model PhotoGallery.Models.AudioInfo
@using PhotoGallery.Views

@{
    ViewBag.Title = "Delete";
}

<h2>@Labels.delete</h2>
<div>@ViewBag.ErrorMsg</div>
@using (Html.BeginForm())
{
    <fieldset>
        <legend>@Labels.audio</legend>
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.FileName)
        @Html.HiddenFor(model => model.Thumbnail)
        @if (String.IsNullOrEmpty(Model.Thumbnail))
        {
            <img alt="" src="@Url.Content("~//Content//audio.jpg")" class="thumbnail-border" width="180" height="180" />
        }
        else
        {
            <img alt="@Model.Title" src="@Url.Action("Thumbnail", new { file = Model.FullThumbnailName})"/>
        }
        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Title)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.UploadDate)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.UploadDate)
        </div>
        <p>
            <input type="submit" value="@Labels.delete" />
            @*@Html.ActionLink(Labels.cancel, "Index")*@
            <a href="@Html.Encode(ViewBag.backUrl)" class="button-link-100" >@Labels.cancel </a>
       </p>
    </fieldset>
}